home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Language/OS - Multiplatform Resource Library
/
LANGUAGE OS.iso
/
oper_sys
/
emerald
/
emrldsys.lha
/
Language
/
Compiler
/
Makefile
< prev
next >
Wrap
Makefile
|
1990-08-16
|
15KB
|
525 lines
#
# @(#)Makefile 1.10 1/20/89
#
# The other host to distribute the compiler to
INSTALLHOSTS = bocklin lectura
RELEASEHOSTS = bezier whistler
EMDIR=/scratch/eric/emerald/
EMSERVERHOST = balder.diku.dk
EMSITE=DIKU
BINFILES = \
${EMDIR}/bin/ec \
${EMDIR}/bin/runec \
${EMDIR}/bin/newTreeVersion \
${EMDIR}/bin/startOpNameServer
.SUFFIXES:
.SUFFIXES: .out .o .c .e .r .f .y .l .s .p .4s
.SCCS_GET:
.4s.o:
@echo m4-ing $*.4s
@m4 $*.4s >$*.xs
@echo assembling $*.xs
@as -o $*.o $*.xs
.c.s:
@echo compiling $*.c "(${INTERESTINGCFLAGS})"
@cc -S ${CFLAGS} $*.c
.c.o:
@echo compiling $*.c "(${INTERESTINGCFLAGS})"
@cc -c ${CFLAGS} $*.c
# GREP = fgrep -i
GREP = egrep
OTHERDOTOS = \
../Malloc/alloc.o
BUILTINSTUFF = Builtins/*.[mc] Builtins/Makefile \
Builtins/MakeTree Builtins/MakeDots \
DBuiltins/*.c DBuiltins/Makefile
OTHERSTUFF = \
ALLTAGS \
MAKETAGS \
makeNewTV \
MAKETOKENNAMES
EFFICIENTSOURCES = \
assert.c \
builtins.c \
cliOpNames.c \
construct.c \
display.c \
doSymbols.c \
environment.c \
error.c \
ident.c \
keyword.c \
main.c \
map.c \
evaluate.c \
names.c \
ndbm.c \
nodes.c \
readTree.c \
scan.c \
semantics.c \
sequence.c \
set.c \
sugar.c \
symbolTable.c \
typeCheck.c \
writeTree.c
BUGGYSOURCES = \
buildATs.c \
allocate.c \
allocRegs.c \
buildGraphs.c \
copyTree.c \
datadesc.c \
debuginfo.c \
depManifest.c \
emit.c \
gencode.c \
genexp.c \
genjump.c \
genutils.c \
inline.c \
invocCache.c \
knowCT.c \
knowLocal.c \
option.c \
primitives.c \
trace.c \
variables.c \
writeAT.c
SOURCES = ${EFFICIENTSOURCES} ${BUGGYSOURCES}
BLINDSOURCES = y.tab.c
EFFICIENTDOTOS = \
assert.o \
builtins.o \
cliOpNames.o \
construct.o \
display.o \
doSymbols.o \
environment.o \
error.o \
ident.o \
keyword.o \
evaluate.o \
main.o \
map.o \
names.o \
ndbm.o \
nodes.o \
readTree.o \
scan.o \
semantics.o \
sequence.o \
set.o \
sugar.o \
symbolTable.o \
typeCheck.o \
writeTree.o \
y.tab.o
BUGGYDOTOS = \
buildATs.o \
allocate.o \
allocRegs.o \
buildGraphs.o \
copyTree.o \
datadesc.o \
debuginfo.o \
depManifest.o \
emit.o \
gencode.o \
genexp.o \
genjump.o \
genutils.o \
option.o \
inline.o \
invocCache.o \
knowCT.o \
knowLocal.o \
primitives.o \
trace.o \
variables.o \
writeAT.o
# generateAT.o
INCLUDES = \
MyParser.h \
addresses.h \
allocate.h \
assert.h \
buildATs.h \
builtins.h \
consts.h \
datadesc.h \
emit.h \
environment.h \
error.h \
evaluate.h \
flags.h \
genutils.h \
ident.h \
keyword.h \
map.h \
names.h \
ndbm.h \
nodes.h \
opNames.h \
option.h \
ecTypes.h \
emTypes.h \
primitives.h \
regdefs.h \
scan.h \
stdTypes.h \
semantics.h \
sequence.h \
symbols.h \
system.h \
tokens.h \
trace.h \
typecheck.h \
types.h \
version.h
BUILTINS = \
Builtins/realBuiltins.a \
DBuiltins/dummyBuiltins.a
ALLCFLAGS = -DEMDIR=\"${EMDIR}\" -DEMSERVERHOST=\"${EMSERVERHOST}\" -D${EMSITE}
INTERESTINGCFLAGS = -g
INTERESTINGECFLAGS = -g
CFLAGS = ${INTERESTINGCFLAGS} ${ALLCFLAGS}
ECFLAGS = ${INTERESTINGECFLAGS} ${ALLCFLAGS}
# ec: efficient ${BUGGYDOTOS} ${EFFICIENTDOTOS} ${BUILTINS}
ec: ${BUGGYDOTOS} ${EFFICIENTDOTOS} ${BUILTINS} ${OTHERDOTOS}
@echo linking ec
@cc ${CFLAGS} -n -o ec ${EFFICIENTDOTOS} ${BUGGYDOTOS} ${BUILTINS} \
${OTHERDOTOS}
slowtags: ${SOURCES} ${INCLUDES}
@echo making tags
@touch tags
@for name in $? ; do echo " $$name" ; ctags -twu $$name ; done
tags: ${SOURCES} ${INCLUDES}
@echo making tags
@ctags -tw ${SOURCES} ${INCLUDES}
ec.cflow: ${SOURCES} ${INCLUDES} em.ccompiler.y
sh -x /u1/norm/bin/cflow -r -ix -i_ ${SOURCES} em.ccompiler.y > ec.cflow
../Malloc/alloc.o:
cd ../Malloc ; make production
y.tab.o: y.tab.c
@echo compiling y.tab.c "($(INTERESTINGECFLAGS))"
@cc -c $(ECFLAGS) y.tab.c
Builtins/realBuiltins.a:
cd Builtins; make phoney
DBuiltins/dummyBuiltins.a:
cd DBuiltins; make
y.tab.c y.tab.h: em.ccompiler.y
@echo "Expect 4 shift/reduce 1 reduce/reduce conflicts."
yacc -d em.ccompiler.y
-if cmp -s y.tab.h UsedParser.h ; then \
copydate UsedParser.h em.ccompiler.y ; \
copydate UsedParser.h y.tab.h ; \
else cp y.tab.h UsedParser.h ; \
copydate y.tab.h UsedParser.h; \
fi;
UsedParser.h: y.tab.h
nodes.o: tagNames.c
main.o: tokenNames.c
main.o: main.c
@echo "compiling main.c (${INTERESTINGECFLAGS})"
@cc -c ${ECFLAGS} main.c
map.o: map.c
@echo "compiling map.c (${INTERESTINGCFLAGS})"
@cc -c ${CFLAGS} map.c
tokenNames.c: MAKETOKENNAMES em.ccompiler.y
csh MAKETOKENNAMES
tagNames.c: ALLTAGS MAKETAGNAMES
csh MAKETAGNAMES
version.h: ALLTAGS makeNewTV
csh makeNewTV
tags.h: ALLTAGS MAKETAGS
csh MAKETAGS
print:
pr ${SOURCES} ${INCLUDES} em.ccompiler.y | enscript -2 -l -r -k
tar:
@echo "Writing to the tape"
@tar cf /dev/rmt12 ${SOURCES} ${INCLUDES} em.ccompiler.y Makefile \
${BUILTINSTUFF} ${OTHERSTUFF}
Compiler.tar:
@echo "Writing to Compiler.tar"
@tar cf Compiler.tar ${SOURCES} ${INCLUDES} em.ccompiler.y Makefile \
${BUILTINSTUFF} ${OTHERSTUFF}
sources:
@echo "${SOURCES}"
includes:
@echo "${INCLUDES}"
lint:
@echo "Running lint"
@lint -hbxuz ${ALLCFLAGS} ${SOURCES} > lint$$$$ 2>&1 ; \
sed \
-e '/warning: z__z redefinition hides earlier one/d' \
-e '/possible pointer alignment problem/d' \
-e '/warning: constant in conditional context/d' \
-e '/warning: constant argument to NOT/d' \
-e '/can.t take & of/d' \
-e '/(.*):/s/^\([^(]*\)(\([^)]*\)):/"\1", line \2:/' \
-e 's/:: \([a-zA-Z-_.]*\)(\([0-9]*\))/:: file "\1", line \2/' \
< lint$$$$ ; \
rm -f lint$$$$
buggylint:
@echo "Running buggy lint"
@lint -hbxu ${BUGGYSOURCES} | \
sed \
-e '/warning: z__z redefinition hides earlier one/d' \
-e '/possible pointer alignment problem/d' \
-e '/warning: constant in conditional context/d' \
-e '/warning: constant argument to NOT/d' \
-e '/can.t take & of/d' \
-e '/(.*):/s/^\([^(]*\)(\([^)]*\)):/"\1", line \2:/' \
-e 's/:: \([a-zA-Z-_.]*\)(\([0-9]*\))/:: file "\1", line \2/'
clean:
rm -f ${BUGGYDOTOS} ${EFFICIENTDOTOS} core *.bak *.ckp efficient \
y.tab.c y.tab.h ec *.g
cd ../Malloc ; make clean
cleanup:
rm -f core *.bak *.ckp *.[0-9]*.s *.[0-9]*.o OID*.t *.tree *.g
# fix:
# @-fixup '${O}' '${N}' ${SOURCES} ${INCLUDES} em.ccompiler.y
# @-fixup '${O}' '${N}' buildATs.c
grep:
@-${GREP} -n -e '${G}' ${SOURCES} ${INCLUDES} em.ccompiler.y
efficient: ${EFFICIENTSOURCES} ${BLINDSOURCES} ${INCLUDES}
@echo "Making efficient .o's"
@touch efficient
@make -k CFLAGS='$(ECFLAGS)' `echo ${EFFICIENTSOURCES} ${BLINDSOURCES} | \
sed -e s/\\\\.c/.o/g`
${EMDIR}/bin/ec: ec
/bin/rm -f ${EMDIR}/bin/ec
cp ec ${EMDIR}/bin/ec
strip ${EMDIR}/bin/ec
install: ${EMDIR}/bin/ec installNTV
echo "( ${BINFILES} ) -> ( ${INSTALLHOSTS} ) " > d.install
echo " install -w;" >> d.install
echo "( ${EMDIR}/Builtins ) -> ( ${INSTALLHOSTS} ) " >> d.install
echo " install -w -R;" >> d.install
rdist -f d.install
rm d.install
installNTV: version.h
@echo "Deleting old version trees on:"
@for name in ${INSTALLHOSTS} ; do echo " $$name" ; \
rsh $$name -n ${EMDIR}/bin/newTreeVersion ; done
touch installNTV
release: ${EMDIR}/bin/ec releaseNTV
echo "( ${BINFILES} ) -> ( ${RELEASEHOSTS} ) " > d.release
echo " install -w;" >> d.release
echo "( ${EMDIR}/Builtins ) -> ( ${RELEASEHOSTS} ) " >> d.release
echo " install -w -R;" >> d.release
rdist -f d.release
rm d.release
releaseNTV: version.h
@echo "Deleting old version trees on:"
@for name in ${RELEASEHOSTS} ; do echo " $$name" ; \
rsh $$name -n ${EMDIR}/bin/newTreeVersion ; done
touch releaseNTV
depend: ${SOURCES} ${BLINDSOURCES} ${INCLUDES}
@echo "Doing .c files"
@grep '^#include' ${SOURCES} ${BLINDSOURCES} | \
grep -v '<' | \
sed 's/:[^"]*"\([^"]*\)".*/: \1/' | \
sed 's/\.c/.o/' | sed 's,\.\./[a-zA-Z0-9+-_]*/,,' | \
awk ' { if ($$1 != prev) { print rec; rec = $$0; prev = $$1; } \
else { if (length(rec $$2) > 78) { print rec; rec = $$0; } \
else rec = rec " " $$2 } } \
END { print rec } ' > makedep
@echo "Doing .h files"
@grep '^#include' ${INCLUDES} | \
grep -v '<' | \
sed 's/:[^"]*"\([^"]*\)".*/: \1/' | \
sed 's/\.c/.o/' | sed 's,\.\./[a-zA-Z0-9+-_]*/,,' | \
awk ' { if ($$1 != prev) { if (prev != "") print rec "\n\tmytouch " substr(prev, 1, length(prev) - 1); rec = $$0; prev = $$1; } \
else { if (length(rec $$2) > 78) { print rec; rec = $$0; } \
else rec = rec " " $$2 } } \
END { print rec ; print "\tmytouch " substr(prev, 1, length(prev)-1);} ' >> makedep
@echo "Finishing up"
@echo '$$r makedep' >>eddep
@echo '/^# DO NOT DELETE THIS LINE/+1,$$d' >>eddep
@echo '$$r makedep' >>eddep
@echo 'w' >>eddep
@cp Makefile Makefile.bak
@ed - Makefile < eddep
@rm eddep makedep
# DO NOT DELETE THIS LINE -- make depend uses it
builtins.o: assert.h tokens.h MyParser.h nodes.h builtins.h buildATs.h
builtins.o: evaluate.h semantics.h sequence.h symbols.h version.h environment.h
builtins.o: opNames.h
cliOpNames.o: assert.h types.h opNames.h
construct.o: assert.h nodes.h keyword.h system.h sequence.h semantics.h
display.o: assert.h nodes.h MyParser.h opNames.h map.h sequence.h environment.h
display.o: system.h
doSymbols.o: assert.h error.h scan.h nodes.h symbols.h MyParser.h sequence.h
doSymbols.o: semantics.h map.h system.h flags.h trace.h opNames.h
environment.o: assert.h scan.h nodes.h error.h opNames.h flags.h system.h
environment.o: sequence.h semantics.h map.h builtins.h environment.h trace.h
environment.o: ndbm.h
error.o: error.h nodes.h
ident.o: ident.h assert.h
keyword.o: assert.h ident.h keyword.h tokens.h
main.o: assert.h nodes.h scan.h semantics.h builtins.h environment.h trace.h
main.o: option.h tokenNames.c
map.o: assert.h system.h map.h
evaluate.o: assert.h error.h scan.h nodes.h symbols.h MyParser.h sequence.h
evaluate.o: semantics.h system.h flags.h trace.h builtins.h map.h evaluate.h
evaluate.o: opNames.h option.h ndbm.h
names.o: assert.h nodes.h system.h error.h ident.h
ndbm.o: ndbm.h
nodes.o: assert.h nodes.h scan.h tagNames.c system.h
readTree.o: assert.h nodes.h symbols.h system.h version.h error.h
scan.o: assert.h nodes.h tokens.h system.h MyParser.h keyword.h error.h
semantics.o: assert.h scan.h nodes.h error.h opNames.h flags.h system.h trace.h
semantics.o: option.h builtins.h
sequence.o: nodes.h sequence.h assert.h
set.o: assert.h system.h set.h
sugar.o: assert.h error.h scan.h nodes.h symbols.h MyParser.h semantics.h
sugar.o: system.h builtins.h flags.h sequence.h opNames.h
symbolTable.o: assert.h symbols.h nodes.h system.h map.h semantics.h sequence.h
symbolTable.o: scan.h
typeCheck.o: assert.h error.h ident.h nodes.h builtins.h MyParser.h sequence.h
typeCheck.o: evaluate.h map.h primitives.h flags.h buildATs.h trace.h system.h
typeCheck.o: opNames.h environment.h semantics.h typecheck.h
writeTree.o: assert.h error.h scan.h nodes.h symbols.h MyParser.h semantics.h
writeTree.o: system.h map.h version.h environment.h flags.h builtins.h trace.h
buildATs.o: assert.h error.h ident.h nodes.h builtins.h symbols.h sequence.h
buildATs.o: MyParser.h semantics.h evaluate.h buildATs.h opNames.h system.h
buildATs.o: map.h flags.h environment.h trace.h
allocate.o: assert.h addresses.h nodes.h map.h sequence.h system.h semantics.h
allocate.o: flags.h builtins.h evaluate.h opNames.h allocate.h trace.h option.h
allocate.o: genutils.h
allocRegs.o: assert.h regdefs.h datadesc.h allocate.h genutils.h system.h
allocRegs.o: error.h trace.h option.h emit.h consts.h
buildGraphs.o: assert.h nodes.h map.h sequence.h trace.h
copyTree.o: assert.h nodes.h sequence.h system.h map.h semantics.h trace.h
datadesc.o: datadesc.h
depManifest.o: assert.h nodes.h map.h sequence.h trace.h semantics.h builtins.h
depManifest.o: MyParser.h flags.h error.h environment.h system.h typecheck.h
emit.o: assert.h genutils.h nodes.h builtins.h regdefs.h flags.h trace.h
emit.o: consts.h
gencode.o: assert.h addresses.h nodes.h map.h sequence.h system.h semantics.h
gencode.o: builtins.h evaluate.h opNames.h primitives.h allocate.h MyParser.h
gencode.o: datadesc.h environment.h regdefs.h genutils.h emit.h error.h
gencode.o: consts.h flags.h trace.h option.h
genexp.o: assert.h addresses.h nodes.h map.h sequence.h system.h semantics.h
genexp.o: builtins.h evaluate.h opNames.h primitives.h allocate.h MyParser.h
genexp.o: datadesc.h environment.h regdefs.h genutils.h emit.h error.h consts.h
genexp.o: flags.h trace.h option.h
genjump.o: datadesc.h genutils.h allocate.h emit.h option.h
genutils.o: assert.h addresses.h nodes.h map.h sequence.h system.h builtins.h
genutils.o: evaluate.h opNames.h primitives.h allocate.h MyParser.h datadesc.h
genutils.o: environment.h regdefs.h genutils.h scan.h semantics.h emit.h
genutils.o: trace.h flags.h option.h
inline.o: assert.h error.h ident.h nodes.h builtins.h sequence.h system.h
inline.o: trace.h opNames.h option.h
invocCache.o: assert.h nodes.h symbols.h sequence.h system.h trace.h opNames.h
invocCache.o: option.h ndbm.h
knowCT.o: assert.h nodes.h map.h sequence.h trace.h semantics.h builtins.h
knowCT.o: primitives.h MyParser.h flags.h
knowLocal.o: assert.h nodes.h map.h sequence.h trace.h semantics.h builtins.h
knowLocal.o: primitives.h MyParser.h flags.h
option.o: types.h flags.h assert.h option.h trace.h
primitives.o: datadesc.h builtins.h error.h nodes.h regdefs.h genutils.h emit.h
primitives.o: consts.h evaluate.h primitives.h system.h trace.h
trace.o: types.h flags.h assert.h trace.h
variables.o: assert.h genutils.h nodes.h builtins.h regdefs.h emit.h
variables.o: environment.h MyParser.h flags.h trace.h system.h semantics.h
writeAT.o: assert.h nodes.h sequence.h system.h builtins.h
y.tab.o: y.tab.h error.h tokens.h nodes.h keyword.h sequence.h semantics.h
MyParser.h: UsedParser.h
mytouch MyParser.h
addresses.h: regdefs.h
mytouch addresses.h
allocate.h: nodes.h ecTypes.h regdefs.h
mytouch allocate.h
buildATs.h: nodes.h
mytouch buildATs.h
datadesc.h: addresses.h types.h ecTypes.h
mytouch datadesc.h
environment.h: map.h
mytouch environment.h
error.h: scan.h
mytouch error.h
evaluate.h: nodes.h
mytouch evaluate.h
genutils.h: assert.h nodes.h datadesc.h flags.h
mytouch genutils.h
keyword.h: ident.h MyParser.h
mytouch keyword.h
nodes.h: ident.h symbols.h tags.h tokens.h types.h set.h
mytouch nodes.h
emTypes.h: stdTypes.h ecTypes.h
mytouch emTypes.h
primitives.h: builtins.h assert.h
mytouch primitives.h
scan.h: tokens.h
mytouch scan.h
semantics.h: nodes.h
mytouch semantics.h
sequence.h: nodes.h
mytouch sequence.h
symbols.h: tags.h ident.h addresses.h
mytouch symbols.h
typecheck.h: nodes.h
mytouch typecheck.h